package org.jeecg.modules.jxc.inventorymanagement.commodityloss.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.jxc.inventorymanagement.commodityloss.entity.JxcDamageList;
import org.jeecg.modules.jxc.inventorymanagement.commodityloss.mapper.JxcDamageListMapper;
import org.jeecg.modules.jxc.inventorymanagement.commodityloss.service.IJxcDamageListService;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


/**
 * @Description: jxc_damage_list
 * @Author: jeecg-boot
 * @Date:   2021-12-21
 * @Version: V1.0
 */
@Service
public class JxcDamageListServiceImpl extends ServiceImpl<JxcDamageListMapper, JxcDamageList> implements IJxcDamageListService {
    @Resource
    private JxcDamageListMapper jxcDamageListMapper;
    /**
    * @author: Mr.Sun
    * @description:
    * @param sTime
* @param eTime
* @param type
    * @return java.util.Map<java.lang.String,java.lang.Object>
    * @exception
    */
    @Override
//    public Map<String,Object> findDamageOrOverflowList(String sTime, String eTime, Integer type) {
    public List<Map<String,Object>> findDamageOrOverflowList(String sTime, String eTime, Integer type) {

        /*for (Map.Entry<String,Object> entry : jxcDamageListMapper.selectDamageOrOverflowList(sTime,eTime,type).entrySet())
        {System.out.println(entry.getKey()+"==========="+entry.getValue());}*/
        return jxcDamageListMapper.selectDamageOrOverflowList(sTime,eTime,type);
    }
    /**
     * @author: Mr.Sun
     * @description: 报损报溢查询
     * @param id
     * @param type
     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     * @exception
     */
    @Override
    public List<Map<String, Object>> findDamageOrOverflowGoodsList(Integer id, Integer type) {

        return jxcDamageListMapper.selectDamageOrOverflowGoodsList(id,type);
    }
}
